﻿using System.Configuration;

namespace Web7.Core.Configuration
{
    /// <summary>
    /// Web7自定义配置节点
    /// </summary>
    public class Web7ConfigurationSection : ConfigurationSection
    {
        /// <summary>
        /// 数据库链接字符串集合
        /// </summary>
        [ConfigurationProperty("connectionStrings")]
        public ConnectionStringSettingsCollection ConnectionStrings
        {
            get
            {
                return (ConnectionStringSettingsCollection)this["connectionStrings"];
            }
            set
            {
                this["connectionStrings"] = value;
            }
        }
        /// <summary>
        /// 数据源提供器集合
        /// </summary>
        [ConfigurationProperty("dataProviders")]
        public Web7DataProviderConfigurationElementCollection Providers
        {
            get
            {
                return (Web7DataProviderConfigurationElementCollection)this["dataProviders"];
            }
            set
            {
                this["dataProviders"] = value;
            }
        }
        /// <summary>
        /// Module(模块)集
        /// </summary>
        [ConfigurationProperty("apps")]
        public Web7AppConfigurationElementCollection Apps
        {
            get
            {
                return (Web7AppConfigurationElementCollection)this["apps"];
            }
            set
            {
                this["apps"] = value;
            }
        }
    }
}
